# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>

# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
#  - patch and libgcc hack to fix ARM FTBFS

pkgname=tuxcmd
pkgver=0.6.70
pkgrel=9
pkgdesc='A GTK2 file manager with two panels'
arch=('x86_64')
url='http://tuxcmd.sourceforge.net/'
license=('GPL')
depends=('gtk2')
makedepends=('fpc')
optdepends=('tuxcmd-modules: modules for tuxcmd')
options=('!docs' '!emptydirs')
source=(https://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgname-dev-$pkgver/$pkgname-$pkgver.tar.bz2
        'tuxcmd-arm-gcc_s.so-linking.patch')
sha256sums=('b9f924766f2b1770f5fddc2b2e79c6778b44606ea05c53c9ffd947436b0e41fb'
            '8587f2258c12e0632458a3f86ecf6aaa5f9850979f33fd6e7d746353c2f87314')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -p1 -i ../tuxcmd-arm-gcc_s.so-linking.patch
  ln -s /usr/lib/libgcc_s.so.1 libgcc_s.so
}

build() {
  cd ${pkgname}-${pkgver}

  make
}

package() {
  cd ${pkgname}-${pkgver}

  make DESTDIR="${pkgdir}"/usr install

# remove license and README file
  rm -rf "${pkgdir}"/usr/share/doc/
}
